package com.qf.common.core.exception;

import com.qf.common.core.common.R;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * Author hehecheng
 * Date 2024/11/18
 * 祝我们都能遇见真诚的人
 * 见字如面
 */
//@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(value = {RuntimeException.class})
    public R handlerException(RuntimeException e) {
        System.out.println("全局异常处理的打印");
        return R.fail(500, e.getMessage());
    }
}

